DISCUSSION
The
ATSUGetFontInstance function obtains, for an indexed font instance, the corresponding axis and value.
The best way to use
ATSUGetFontInstance is to call it twice:
-
Pass the ID of the font whose font instance you want information about in the iFont parameter, NULL for the oAxes and oValues parameters, and 0 for the other parameters. ATSUGetFontInstance returns the size of the oAxes and oValues arrays in the oActualVariationCount parameter.
-
Allocate enough space for an array of the returned size, then call the function again, passing pointers in the oAxes and oValues parameters; on return, the pointers reference the array of axes and values corresponding to the font instances in the font.